<?php
if(!defined("DNREAD")) exit();
global $setting,$usermain,$lang,$userapi;
$bt = '';
if (defined('SETTING')) {
    return $bs = '';
}
if (preparse($usermain['logged'],THIS_INT) == 0 && preparse($usermain['userid'],THIS_INT) == 0) {
    $bt = $tm->noaccessprint(true);
} else {
    if (isset($usermain['avatar']) && !empty($usermain['avatar'])) {
        $bt.= '<p class="ac">'.$usermain['avatar'].'</p>';
    }
    $bt.= '<fieldset class="userblock">
    <legend class="fb">'.$usermain['uname'].'</legend>';
    if ($setting['naddit'] == 'yes') {
        $bt.= '<p class="pad-link user"><a href="'.$setting['site_url'].'/index.php?dn=news&amp;re=add">'.$lang['add_news'].'</a></p>';
    }
    if ($setting['ladd'] == 'yes') {
        $bt.= '<p class="pad-link user"><a href="'.$setting['site_url'].'/index.php?dn=link&amp;re=add">'.$lang['ladd'].'</a></p>';
    }
    if (isset($userapi->data['linkprivmess']) && !empty($userapi->data['linkprivmess'])) {
        $bt.= '<p class="pad-link user"><a href="'.$setting['site_url'].'/'.$userapi->data['linkprivmess'].'">'.$lang['private_message'].'('.$usermain['newmsg'].')</a></p>';
    }
    $bt.= '<p class="pad-link user"><a href="'.$setting['site_url'].'/'.$userapi->data['linkprofile'].$usermain['userid'].'">'.$lang['your_profile'].'</a></p>'
          .'<p class="pad-link user"><a href="'.$setting['site_url'].'/index.php?dn=user&amp;to=logout">'.$lang['goto_logout'].'</a></p>'; 
    $bt.= '</fieldset>';
}
return $bt;
?>
